#ifndef MODELVIEW_H
#define MODELVIEW_H

#include <QFrame>
#include <QGridLayout>
#include <QComboBox>

#include "GLDrawer.h"
#include "MVToolBar.h"

class ModelView : public QFrame
{
    Q_OBJECT

public:
    ModelView(QWidget *parent, int type = 0);
    ~ModelView();

    void mousePressEvent(QMouseEvent *event);
    bool isSelected();
    MVToolBar *getToolBar();
    GLDrawer *getGLDrawer();

public slots:
    void select();
    void unselect();
    void viewTypeChange(int type);

signals:
    void selected();

private:
    GLDrawer *glView;
    QGridLayout *layout;
    bool selectState;
    QComboBox *viewType;
    MVToolBar *toolBar;
};

#endif // MODELVIEW_H
